package org.qloudgen.borg.pages.common;

import org.apache.wicket.markup.html.WebPage;
import org.apache.wicket.markup.html.include.Include;
import org.apache.wicket.markup.html.link.BookmarkablePageLink;
import org.apache.wicket.markup.html.panel.FeedbackPanel;
import org.apache.wicket.request.mapper.parameter.PageParameters;

public class BasePage extends WebPage {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	protected PageParameters pp ;
	
	protected BasePage(){
		this.addFeedBack();
	}
	
	public void addHeader(){
		this.add(new Include("header","common/header.html"));
	}
	
	public void addFooter(){
		this.add(new Include("copyright","common/copyright.html"));
	}
	
	@SuppressWarnings({ "unchecked", "rawtypes" })
	public void addReturnPage(Class pageClass,PageParameters pp){
		this.add(new BookmarkablePageLink<Object>("returnPage", pageClass,pp));
		
	}
	
	public void addFeedBack(){
		FeedbackPanel feedback = new FeedbackPanel("feedback");
		feedback.setOutputMarkupId(true);
		this.add(feedback);
	}
}
